import pluginJs from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';

export default [
  { files: ['**/*.{js,mjs,cjs,vue,jsx}'] },
  { languageOptions: { globals: globals.browser } },
  pluginJs.configs.recommended,
  ...pluginVue.configs['flat/essential'],
  {
    rules: {
      'vue/multi-word-component-names': [
        'error',
        {
          ignores: ['index'] //需要忽略的组件名
        }
      ]
    },
    parserOptions: {
      babelOptions: {
        babelrc: false,
        configFile: false,
        presets: ['@vue/babel-preset-jsx']
      }
    },
  }
];

